<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .other_page{
            opacity: 0;
            position: absolute;
            top: 10px;
            right: 10px;
            transition: opacity 0.5s linear;

        }
        .container:hover .other_page{
            opacity: 1;
        }
        .container{
            border: 1px red solid;
           
            display: inline-block;
            
            position: relative;
            margin-left: 50%;
            transform: translateX(-50%);
        }
        .container:hover .biliimg{
            
          min-width: 500px;
        }
        .text{
            overflow: hidden;
            
            position: absolute;
            background-color: rgba(0,0,0,0.5);
            bottom: 100%;
            left: 0;
            top: 0;
            right: 0;
            height: 0;
            width: 100%;
            transition: height 1s linear;
        }
        .container:hover .text{
           bottom: 0;
            height: 100%;
        }
        .text .s1{
            display: inline-block;
            margin-left: 30px;
            margin-top: 40px;
            font-weight: 700;
            font-style: italic;
        }
    </style>
</head>
<body>
    <h1 style="text-align: center;">bilibili悬停效果</h1>
    <div class="container">
        <img src="./image/小姐姐.png" alt="" class="biliimg" style="margin: 0;padding: 0;">
        <div class="text">
            <span style="font-size: 30px;color: white;" class="s1">HelloWorld</span>
            <br>
            <span class="s1">How are you?</span>
            
            <span class="s1">远方的她</span>

        </div>
        <div class="other_page">
            <img src="./image/点击开关图片.png" alt="">
        </div>
    </div>
</body>
</html>